import 'package:cannon_physics/cannon_physics.dart' as cannon;
import 'package:three_js/three_js.dart';
import 'package:three_js_geometry/three_js_geometry.dart';
import 'dart:math' as math;
import 'package:vector_math/vector_math.dart' as vmath;

extension CQ2Q on vmath.Quaternion{
  Quaternion toQuaternion(){
    return Quaternion(x,y,z,w);
  }
}
extension CV2V on vmath.Vector3{
  Vector3 toVector3(){
    return Vector3(x,y,z);
  }
}

extension TQ2Q on Quaternion{
  vmath.Quaternion toQuaternion(){
    return vmath.Quaternion(x.toDouble(),y.toDouble(),z.toDouble(),w.toDouble());
  }
}
extension TV2V on Vector3{
  vmath.Vector3 toVector3(){
    return vmath.Vector3(x,y,z);
  }
}

class GeometryCache {
  List<Object3D> geometries = [];
  List gone = [];

  Scene scene;
  Function createFunc;

  GeometryCache(this.scene, this.createFunc);

  Object3D request(){
    Object3D geometry = geometries.isNotEmpty ? geometries.removeLast() : createFunc();

    scene.add(geometry);
    gone.add(geometry);
    return geometry;
  }

  void restart(){
    while (gone.isNotEmpty) {
      geometries.add(gone.removeLast());
    }
  }

  void hideCached(){
    geometries.forEach((geometry){
      scene.remove(geometry);
    });
  }
}

class ConversionUtils{
  static BufferGeometry shapeToGeometry(cannon.Shape shape,{bool flatShading = true, vmath.Vector3? position}) {
    switch (shape.type) {
      case cannon.ShapeType.sphere: {
        shape as cannon.Sphere;
        return SphereGeometry(shape.radius, 8, 8);
      }

      case cannon.ShapeType.particle: {
        return SphereGeometry(0.1, 8, 8);
      }
      case cannon.ShapeType.sizedPlane: {
        shape as cannon.SizedPlane;
        return PlaneGeometry(shape.width, shape.height, 4, 4);
      }
      case cannon.ShapeType.plane: {
        return PlaneGeometry(500, 500, 4, 4);
      }
      case cannon.ShapeType.box: {
        shape as cannon.Box;
        return BoxGeometry(shape.halfExtents.x * 2, shape.halfExtents.y * 2, shape.halfExtents.z * 2);
      }
      case cannon.ShapeType.cylinder: {
        shape as cannon.Cylinder;
        return CylinderGeometry(shape.radiusTop, shape.radiusBottom, shape.height, shape.numSegments);
      }
      case cannon.ShapeType.cone: {
        shape as cannon.Cone;
        return ConeGeometry(shape.radius, shape.height, shape.numSegments);
      }
      case cannon.ShapeType.capsule:
      case cannon.ShapeType.convex: {
        shape as cannon.ConvexPolyhedron;
        List<Vector3> vertices = [];
        // Add vertices
        for (int i = 0; i < shape.vertices.length; i++) {
          final vertex = shape.vertices[i];
          vertices.add(vertex.toVector3());
        }
        final geometry = ConvexGeometry(vertices);
        geometry.computeBoundingSphere();

        if(flatShading) {
          geometry.computeFaceNormals();
        } else {
          geometry.computeVertexNormals();
        }

        return geometry;
      }
      case cannon.ShapeType.heightfield: {
        shape as cannon.Heightfield;
        final geometry = PlaneGeometry(
          shape.size.width,
          shape.size.height,
          shape.segments.width.toInt()-1,
          shape.segments.height.toInt()-1
        );
        
        final Float32Array verts = geometry.attributes['position'].array;
        int x = 0;
        int y = -1;

        for(int i = 0; i < verts.length~/3;i++){
          if(i%shape.segments.width == 0){
            y++;
            x = 0;
          }
          verts[(i*3)+2] = shape.data[y][x];
          x++;
        }

        geometry.translate(shape.size.width/2, shape.size.height/2,0);
        geometry.rotateZ(math.pi/2);
        geometry.translate(shape.size.width, 0,0);

        geometry.computeBoundingSphere();

        if (!flatShading) {
          geometry.computeFaceNormals();
        } else {
          geometry.computeVertexNormals();
        }

        return geometry;
      }
      case cannon.ShapeType.capsule:{
        shape as cannon.Capsule;
        final geometry = BufferGeometry();
        List<int> indicies = [];
        List<double> verts = [];
        List<double> normals = [];
        for(int i = 0; i < shape.faces.length; i++){
          for(int j = 0; j < shape.faces[i].length;j++){
            indicies.add(shape.faces[i][j]);
          }
        }
        for(int i = 0; i < shape.vertices.length; i++){
          verts.addAll([shape.vertices[i].x/10,shape.vertices[i].y/10,shape.vertices[i].z/10]);
          if(shape.faceNormals.length > i){
            normals.addAll([shape.faceNormals[i]!.x,shape.faceNormals[i]!.y,shape.faceNormals[i]!.z]);
          }
        }
        geometry.setIndex(indicies);
        geometry.setAttributeFromString('position', Float32BufferAttribute(Float32Array.fromList(verts), 3));
        //geometry.setAttribute('normal', Float32BufferAttribute(Float32Array.from(normals), 3));

        geometry.computeBoundingSphere();

        if (flatShading) {
          geometry.computeFaceNormals();
        } else {
          geometry.computeVertexNormals();
        }

        return geometry;
      }
      case cannon.ShapeType.trimesh: {
        shape as cannon.Trimesh;
        final geometry = BufferGeometry();
        
        geometry.setIndex(shape.indices);
        geometry.setAttributeFromString(
            'position', Float32BufferAttribute(Float32Array.fromList(shape.vertices), 3));
        if(shape.normals != null){
          geometry.setAttributeFromString(
            'normal', Float32BufferAttribute(Float32Array.fromList(shape.normals!), 3));
        }
        if(shape.uvs != null){
          geometry.setAttributeFromString(
            'uv', Float32BufferAttribute(Float32Array.fromList(shape.uvs!), 2));
        }

        geometry.computeBoundingSphere();

        if (flatShading) {
          geometry.computeFaceNormals();
        } else {
          geometry.computeVertexNormals();
        }

        return geometry;
      }

      default: {
        throw('Shape not recognized: "${shape.type}"');
      }
    }
  }

  static Object3D bodyToMesh(cannon.Body body, material) {
    final group = Group();
    group.position.setFrom(body.position.toVector3());
    group.quaternion.setFrom(body.quaternion.toQuaternion());

    final meshes = body.shapes.map((shape){
      final geometry = shapeToGeometry(shape);
      return Mesh(geometry, material);
    });
    
    int i = 0;
    meshes.forEach((Mesh mesh){
      final offset = body.shapeOffsets[i];
      final orientation = body.shapeOrientations[i];
      mesh.position.setFrom(offset.toVector3());
      mesh.quaternion.setFrom(orientation.toQuaternion());
      group.add(mesh);
      i++;
    });

    return group;
  }

  static cannon.Trimesh fromGraphNode(Object3D group){
    List<double> vertices = [];
    List<int> indices = [];

    group.updateWorldMatrix(true, true);
    group.traverse((object){
      if(object is Mesh){
        Mesh obj = object;
        late BufferGeometry geometry;
        bool isTemp = false;

        if(obj.geometry!.index != null){
          isTemp = true;
          geometry = obj.geometry!.clone().toNonIndexed();
        } 
        else {
          geometry = obj.geometry!;
        }

			  BufferAttribute positionAttribute = geometry.getAttributeFromString('position');

				for(int i = 0; i < positionAttribute.count; i += 3) {
					Vector3 v1 = Vector3().fromBuffer(positionAttribute, i);
					Vector3 v2 = Vector3().fromBuffer(positionAttribute, i + 1);
					Vector3 v3 = Vector3().fromBuffer(positionAttribute, i + 2);

					v1.applyMatrix4(obj.matrixWorld);
					v2.applyMatrix4(obj.matrixWorld);
					v3.applyMatrix4(obj.matrixWorld);

          vertices.addAll([v1.x,v1.y,v1.z]);
          vertices.addAll([v2.x,v2.y,v2.z]);
          vertices.addAll([v3.x,v3.y,v3.z]);
          
          indices.addAll([i,i+1,i+2]);
				}

        if(isTemp){
          geometry.dispose();
        }
      }
    });

    return cannon.Trimesh(vertices, indices);
  }

  static cannon.Shape geometryToShape(BufferGeometry geometry) {
    switch (geometry.type) {
      case 'BoxGeometry':
      case 'BoxBufferGeometry': {
        final width = geometry.parameters!['width'];
        final height = geometry.parameters!['height'];
        final depth = geometry.parameters!['depth'];
        final halfExtents = vmath.Vector3(width / 2, height / 2, depth / 2);
        return cannon.Box(halfExtents);
      }
      case 'PlaneGeometry':
      case 'PlaneBufferGeometry': {
        Float32Array points = geometry.attributes['position'].array;
        bool isFlat = true;
        double x = points[0];
        double y = points[1];
        double z = points[2];

        List<List<double>> matrix = [];
        int sizeX = 15;
        int sizeZ = 15;

        for(int i = 2; i < points.length;i+=3){
          bool xf = false;
          bool yf = false;
          bool zf = false;
          if(points[i] == x){
            xf = true;
          }
          else if(points[i+1] == y){
            yf = true;
          }
          else if(points[i+2] == z){
            zf = true;
          }

          if(!xf && !yf && !zf){
            isFlat = false;
          }
        }

        return isFlat?cannon.Plane():cannon.Heightfield(matrix);
      }
      case 'SphereGeometry':
      case 'SphereBufferGeometry': {
        return cannon.Sphere(geometry.parameters!['radius']);
      }
      case 'CylinderGeometry':
      case 'CylinderBufferGeometry': {
        return cannon.Cylinder(
          radiusTop: geometry.parameters!['radiusTop'], 
          radiusBottom: geometry.parameters!['radiusBottom'], 
          height: geometry.parameters!['height'].toDouble(), 
          numSegments: geometry.parameters!['radialSegments']
        );
      }
      case 'TorusGeometry':
      case 'TorusBufferGeometry': {
        return cannon.Trimesh.createTorus(
          cannon.TorusGeometry(
            geometry.parameters!['radius'].toDouble(), 
            geometry.parameters!['tube'], 
            geometry.parameters!['radialSegments'], 
            geometry.parameters!['tubularSegments'],
            geometry.parameters!['arch'] ?? math.pi*2,
          )
        );
      }
      case 'IcosahedronGeometry':
      case 'IcosahedronBufferGeometry': {
        Float32Array points = geometry.attributes['position'].array;
        List<vmath.Vector3> verticies = [];
        List<List<int>>? faces = [];
        List<int> indicies = [];

        for(int i = 0; i < points.length; i+=3){
          verticies.add(
            vmath.Vector3(
              points[i],
              points[i+1],
              points[i+2]
            )
          );
          if(i < points.length/3){
            faces.add([i, i + 1, i + 2]);
            indicies.addAll([i, i + 1, i + 2]);
          }
        }

        return cannon.ConvexPolyhedron(
          vertices: verticies,
          faces: faces,
        );
      }
      // Create a ConvexPolyhedron with the convex hull if
      // it's none of these
      default: {
        // Simplify the geometry if it has too many points,
        // make it have no more than MAX_VERTEX_COUNT vertices
        Float32Array pts = geometry.attributes['position'].array;

        // final simplifiedGeometry = SimplifyModifier().modify(
        //   geometry, 
        //   Math.max(vertexCount.length - 150, 0)
        // );

        // List<Vector3> vecs = [];
        // for(int i = 0; i < pts.length; i+=3){
        //   vecs.add(Vector3(pts[i],pts[i+1],pts[i+2]));
        // }

        // final hullGeometry = ConvexGeometry(vecs);

        Float32Array points = geometry.attributes['position'].array;
        Float32Array norms = geometry.attributes['normal'].array;
        final indexes = geometry.index;

        List<vmath.Vector3> verticies = [];
        List<List<int>>? faces = [];
        List<vmath.Vector3>? normals = [];
        List<int> indicies = [];

        for(int i = 0; i < points.length; i+=3){
          int i3 = i*3;
          verticies.add(
            vmath.Vector3(
              points[i],
              points[i+1],
              points[i+2]
            )
          );

          normals.add(vmath.Vector3(norms[i],norms[i+1],norms[i+2]));
          if(indexes != null && i < indexes.length){
            faces.add([
              indexes.getX(i)!.toInt(),
              indexes.getX(i+1)!.toInt(),
              indexes.getX(i+2)!.toInt(),
            ]);
            indicies.addAll([
              indexes.getX(i)!.toInt(),
              indexes.getX(i+1)!.toInt(),
              indexes.getX(i+2)!.toInt(),
            ]);
          }
          else if(i < points.length/3){
            faces.add([i, i + 1, i + 2]);
            indicies.addAll([i, i + 1, i + 2]);
          }
        }

        // Construct polyhedron
        cannon.Trimesh polyhedron = cannon.Trimesh(
          points.sublist(0),
          indicies
        );

        // cannon.ConvexPolyhedron polyhedron = cannon.ConvexPolyhedron(
        //   vertices: verticies,
        //   faces: faces,
        //   //normals: normals
        // );

        return polyhedron;
      }
    }
  }
}

List<Map<String,List>> bunny = [
  {
    'vertices': [
      -0.05742858426966302, 0.3614640449438202, -0.5847649396853932, -0.3901165842696629, 0.31258404494382036,
      0.2767210603146067, 0.4567554157303372, -0.2362159550561797, 0.3372288603146067, -0.004048584269662925,
      -0.44041595505617964, -0.2344109396853933, -0.007838584269662774, -0.5290759550561794, 0.49204726031460666,
      0.22547941573033703, 0.21710404494382035, 0.6046844603146068, 0.5147354157303372, 0.1969840449438202,
      -0.10327293968539322, -0.04759458426966279, 0.5234440449438205, -0.3146629396853933, 0.2973074157303371,
      -0.39711595505617964, -0.2067709396853933, -0.432828584269663, 0.22046404494382038, -0.4062989396853932,
      -0.384838584269663, -0.36917595505617945, 0.1391890603146067, -0.14053058426966292, -0.19463595505617975,
      -0.5184989396853933, -0.06270458426966286, 0.3586640449438205, 0.5489774603146067, 0.12872341573033697,
      0.24464404494382025, -0.5897849396853933, -0.28646258426966287, 0.10466404494382037, 0.4850132603146067,
      0.5699594157303371, 0.042324044943820194, 0.2133610603146067, -0.29631458426966284, 0.4644840449438203,
      0.12053906031460668, 0.3487874157303371, -0.46463595505617944, 0.17465506031460667, -0.17333858426966287,
      0.06500404494382012, -0.6445209396853933, -0.2969045842696628, -0.19441595505617953, -0.3925729396853932,
      0.16719141573033713, -0.2205759550561796, 0.5817684603146067, 0.33441341573033717, 0.3436240449438203,
      -0.27650893968539325, -0.3112125842696629, 0.40228404494382025, -0.4039629396853932, 0.4905154157303371,
      0.05004404494382014, 0.42739393231460665, -0.19048858426966286, -0.42533595505617955, -0.1752429396853933,
      -0.100920584269663, 0.06980404494382048, 0.5759724603146067, -0.009714584269662874, -0.2007759550561798,
      -0.5105349396853933, 0.11729541573033697, -0.49405595505617944, -0.06536093968539333, -0.39495258426966295,
      -0.3258559550561794, -0.04128693968539329, -0.461190584269663, 0.15196404494382015, -0.01863893968539332,
      0.1910174157303371, -0.34695595505617943, 0.5503976603146067, 0.4391314157303371, 0.05966404494382033,
      -0.2135169396853933, 0.2546934157303371, -0.36893595505617977, -0.2865149396853932, -0.4106185842696629,
      0.3563640449438203, 0.11265906031460671, -0.26327258426966305, 0.4483840449438203, 0.3221020603146067,
      0.050865415730337205, 0.3124240449438202, 0.5985836603146067, 0.36892341573033716, -0.37203595505617953,
      -0.061882939685393296, -0.2593445842696628, 0.2915640449438202, -0.5534469396853932, -0.40987858426966295,
      0.15452404494382027, 0.2632712603146067, -0.1174885842696628, -0.4191759550561795, 0.4614434603146067,
      0.04471941573033722, 0.37774404494382036, -0.5475869396853932, 0.030517415730337172, 0.23870404494382041,
      -0.6515609396853932, -0.10939658426966303, -0.4759159550561796, -0.07148493968539335, -0.32932858426966294,
      -0.4183559550561798, 0.03514506031460665, 0.565701415730337, 0.09410404494382035, 0.05798906031460671,
      0.4223454157303372, -0.36917595505617945, 0.16861306031460668, -0.11263658426966294, -0.3120559550561795,
      -0.4213129396853932, 0.3975814157303371, 0.08660404494382007, 0.5219468603146067, 0.3895374157303372,
      -0.2578559550561797, 0.4375793803146067, -0.2803605842696628, 0.01734404494382019, -0.5542289396853932,
      -0.30087058426966284, 0.20156404494382046, 0.4660688603146067, 0.46488541573033715, 0.25550404494382023,
      -0.1894389396853933, -0.07149458426966282, -0.20091595505617993, 0.5534104603146067, 0.02677941573033704,
      0.06436404494382003, 0.6072890603146067, -0.23028658426966286, 0.5000840449438204, -0.11890493968539326,
      0.26688741573033703, -0.44161595505617973, -0.19083693968539336, 0.10586141573033714, -0.47515595505617997,
      0.5044486603146067, 0.12044141573033695, 0.13542404494382038, -0.5742909396853932, 0.13014941573033723,
      -0.4095959550561799, -0.2956409396853932, -0.07543058426966298, 0.011224044943820177, -0.6297829396853932,
      -0.2806145842696629, -0.34457595505617983, -0.22431293968539326, -0.394204584269663, 0.34108404494382033,
      -0.2744649396853932, 0.32837541573033713, -0.4519559550561795, -0.05777093968539329, -0.4461965842696628,
      0.2234840449438204, 0.1220570603146067, -0.2612365842696628, -0.3810959550561797, 0.3073468603146067,
      -0.09941658426966304, 0.2442440449438203, 0.5679490603146067, 0.5472794157303371, 0.1526640449438203,
      -0.039118939685393345, -0.35450658426966275, -0.0470359550561798, 0.32651606031460667, -0.33818258426966297,
      0.29534404494382044, -0.49360293968539315, 0.09564741573033708, -0.18601595505617946, 0.5885020603146066,
      -0.09288458426966284, 0.2554440449438204, -0.6264609396853932, 0.2655194157303371, -0.4868959550561795,
      0.2234190603146067, -0.19031658426966291, 0.4049640449438204, 0.43720790031460666, -0.2023505842696628,
      0.4125640449438202, -0.45876893968539323, -0.3996725842696628, 0.20018404494382042, -0.45495493968539313,
      0.12832541573033718, 0.4367240449438203, -0.3275049396853933, -0.1513365842696628, -0.20065595505617967,
      0.5084486603146067, 0.32158941573033717, 0.16992404494382035, -0.36519693968539324, -0.21953658426966294,
      -0.4589959550561799, 0.17666506031460666, 0.5102234157303371, -0.0010959550561799314, -0.014894939685393294,
      0.08166141573033703, -0.19983595505617996, -0.46059093968539333, 0.3796694157303371, -0.022455955056179644,
      0.5097000603146067, -0.2160065842696628, 0.33800404494382036, 0.4613738603146067, -0.41833858426966286,
      0.03506404494382015, 0.18174106031460668, 0.12328741573033719, 0.015564044943820077, 0.6015348603146067,
      0.13327141573033707, 0.30716404494382027, -0.5304249396853933, -0.09419458426966298, 0.4230040449438203,
      -0.4805789396853932, 0.2970134157303371, 0.1405640449438202, 0.5697234603146067, 0.04576741573033716,
      0.009524044943820142, -0.5645089396853933,
    ],
    'faces': [
      59, 57, 88, 2, 15, 23, 9, 19, 28, 9, 28, 29, 28, 10, 29, 31, 8, 32, 12, 7, 34, 33, 1, 34, 16, 33, 34, 7, 12, 35,
      21, 7, 35, 0, 7, 40, 0, 40, 41, 40, 13, 41, 24, 3, 42, 3, 27, 42, 27, 4, 42, 10, 28, 43, 24, 42, 43, 36, 44, 45,
      15, 2, 45, 2, 17, 45, 44, 15, 45, 19, 11, 46, 3, 24, 46, 11, 26, 46, 23, 5, 47, 20, 30, 47, 17, 2, 48, 2, 23, 48,
      18, 11, 49, 11, 19, 49, 34, 1, 50, 1, 38, 50, 38, 14, 50, 5, 6, 51, 13, 21, 51, 6, 31, 51, 35, 5, 51, 21, 35, 51,
      25, 14, 52, 5, 35, 53, 25, 52, 53, 7, 22, 54, 22, 16, 54, 34, 7, 54, 16, 34, 54, 27, 3, 55, 32, 8, 55, 4, 17, 56,
      30, 4, 56, 48, 30, 56, 17, 48, 56, 13, 31, 57, 31, 32, 57, 41, 13, 57, 26, 32, 58, 3, 46, 58, 46, 26, 58, 55, 3,
      58, 32, 55, 58, 11, 18, 59, 26, 11, 59, 18, 41, 59, 41, 57, 59, 28, 19, 60, 43, 28, 60, 24, 43, 60, 19, 46, 60,
      46, 24, 60, 22, 9, 61, 16, 22, 61, 33, 16, 61, 9, 33, 61, 8, 36, 62, 36, 45, 62, 45, 17, 62, 27, 55, 62, 55, 8,
      62, 9, 29, 63, 1, 33, 63, 33, 9, 63, 38, 1, 63, 10, 4, 64, 4, 39, 64, 39, 14, 64, 14, 25, 65, 35, 12, 65, 12, 50,
      65, 50, 14, 65, 53, 35, 65, 25, 53, 65, 6, 5, 66, 5, 23, 66, 23, 15, 66, 31, 6, 66, 15, 44, 66, 14, 38, 67, 38,
      10, 67, 10, 64, 67, 64, 14, 67, 9, 22, 68, 37, 18, 68, 22, 37, 68, 4, 30, 69, 30, 20, 69, 52, 4, 69, 53, 52, 69,
      37, 0, 70, 18, 37, 70, 41, 18, 70, 0, 41, 70, 17, 4, 71, 4, 27, 71, 62, 17, 71, 27, 62, 71, 12, 34, 72, 22, 7, 73,
      0, 37, 73, 37, 22, 73, 19, 9, 74, 18, 49, 74, 49, 19, 74, 9, 68, 74, 68, 18, 74, 7, 21, 75, 40, 7, 75, 21, 40, 75,
      39, 4, 76, 14, 39, 76, 4, 52, 76, 52, 14, 76, 31, 13, 77, 13, 51, 77, 51, 31, 77, 4, 10, 78, 42, 4, 78, 10, 43,
      78, 43, 42, 78, 8, 31, 79, 36, 8, 79, 44, 36, 79, 31, 66, 79, 66, 44, 79, 32, 26, 80, 26, 57, 80, 57, 32, 80, 23,
      47, 81, 47, 30, 81, 30, 48, 81, 48, 23, 81, 50, 12, 82, 34, 50, 82, 12, 72, 82, 72, 34, 82, 29, 10, 83, 10, 38,
      83, 63, 29, 83, 38, 63, 83, 20, 5, 84, 5, 53, 84, 69, 20, 84, 53, 69, 84, 21, 13, 85, 13, 40, 85, 40, 21, 85, 7,
      0, 86, 0, 73, 86, 73, 7, 86, 5, 20, 87, 47, 5, 87, 20, 47, 87, 57, 26, 88, 26, 59, 88,
    ],
    'offset': [-0.6374034157303371, -0.5318040449438204, -0.12628506031460668],
  },
  {
    'vertices': [
      0.18312999999999996, 0.3929772857142859, -0.49442626204081624, -0.47356, -0.22878471428571423,
      0.06388553795918363, 0.49347399999999997, 0.05888128571428597, 0.6839377379591836, 0.523092, -0.615852714285714,
      -0.3623542620408164, 0.29795600000000005, -0.6396527142857142, 0.5237357379591836, -0.016108000000000122,
      0.25562728571428606, 0.5833257379591836, -0.1726779999999999, -0.350572714285714, -0.48436026204081634,
      0.2637880000000001, 0.6395372857142858, -0.1225882620408164, 0.47244800000000003, 0.03332528571428606,
      -0.5947702620408163, -0.3154, -0.46905271428571405, 0.26751057795918365, -0.33791000000000004,
      0.16055328571428595, -0.32789826204081635, -0.09473999999999994, 0.5225792857142859, 0.06283333795918364,
      0.42219599999999996, -0.7213527142857141, -0.20881626204081638, -0.17804200000000003, 0.0639132857142859,
      0.5611497379591835, 0.04227799999999993, -0.03455071428571399, -0.6525762620408163, 0.16387800000000008,
      0.6094052857142858, 0.21210353795918363, -0.35536999999999996, -0.37393271428571406, -0.2886022620408163,
      0.05299600000000004, -0.29599271428571416, 0.6211077379591836, 0.406362, -0.4698927142857141, 0.6022677379591836,
      -0.22521799999999992, 0.312217285714286, 0.36113673795918366, 0.5311920000000001, -0.29243271428571416,
      -0.5477942620408164, 0.10039599999999993, -0.6569127142857141, 0.4349871379591837, 0.30808, 0.3858872857142859,
      0.5338077379591836, 0.0012620000000000964, 0.41034528571428575, -0.4087922620408163, -0.38242600000000004,
      -0.05824271428571404, 0.34606153795918365, 0.003242000000000078, -0.43729271428571415, -0.49720226204081636,
      0.378242, 0.28627928571428596, -0.5869762620408163, -0.26079200000000013, 0.0424512857142858,
      -0.48169626204081634, 0.19478999999999996, 0.13399528571428587, 0.6870077379591836, -0.42139799999999994,
      -0.40953271428571414, -0.04915826204081637, -0.46909999999999996, -0.1501807142857139, -0.18474426204081634,
      -0.2914199999999999, 0.3417752857142857, -0.06051426204081638, 0.43184200000000006, -0.36225271428571415,
      -0.5655442620408163, -0.18901999999999985, -0.23158071428571403, 0.5101517379591837, 0.17797599999999997,
      -0.16198071428571414, 0.6858037379591836, -0.4578, 0.012045285714285647, 0.16055333795918364, 0.02401400000000009,
      0.13037728571428597, -0.6162362620408163, -0.11105600000000004, 0.5016692857142859, -0.10698426204081636,
      0.313102, 0.016381285714285765, -0.6604582620408164, 0.020591999999999944, 0.509897285714286, 0.31874593795918366,
      -0.0742179999999999, -0.5615927142857142, 0.4288863379591837, -0.41642, 0.15983128571428584,
      -0.047772262040816374, -0.1183479999999999, 0.25848128571428597, -0.48454226204081624, 0.22815799999999997,
      -0.45739271428571404, 0.6194757379591836, 0.291168, 0.502645285714286, -0.3975462620408163, -0.3080480000000001,
      0.31248728571428597, 0.11189353795918364, 0.12962200000000007, -0.11738671428571412, -0.6521402620408164,
      0.12859800000000005, 0.357467285714286, 0.5597737379591836, 0.425866, -0.04750071428571401, 0.7011597379591836,
      -0.4808620000000001, -0.033632714285714016, -0.1007742620408164, -0.12118200000000012, -0.13450271428571425,
      -0.5829262620408163, -0.3522679999999999, -0.16627871428571428, -0.36980426204081635, 0.20624399999999998,
      0.6457332857142859, 0.07548793795918363, -0.21304, 0.3531592857142858, -0.24454626204081636, 0.20933000000000007,
      -0.5303927142857141, -0.4462062620408163, 0.44162000000000007, 0.13116528571428576, -0.5897682620408164,
      -0.36409199999999986, -0.22387071428571415, 0.3351019379591837, 0.11226999999999998, 0.26069528571428613,
      -0.5840702620408164, -0.39030200000000004, 0.05895928571428577, 0.29699473795918363, -0.38773999999999986,
      0.19331328571428608, 0.14395093795918362, 0.022095999999999894, -0.2671727142857142, -0.5844902620408163,
      0.09633400000000003, -0.5219327142857142, 0.5438777379591836, 0.248714, 0.6355992857142858, 0.023451737959183636,
      -0.44444400000000006, -0.02393071428571414, -0.22538026204081635, -0.23353000000000002, -0.12451471428571392,
      0.5085157379591837, -0.47476399999999985, -0.2532127142857141, -0.10809426204081636, 0.0018099999999999783,
      0.09268328571428586, 0.6370837379591837, -0.38835600000000015, -0.42563271428571414, 0.15240473795918363,
      0.08103200000000005, -0.49203271428571393, -0.4622642620408162, 0.22089999999999999, 0.12493728571428564,
      -0.6411402620408163, -0.18778799999999995, -0.5153527142857139, 0.3792801379591837, 0.32569000000000004,
      -0.15418671428571407, -0.6397962620408163, 0.172292, -0.2824727142857142, -0.5988842620408165,
      -0.08109199999999994, 0.029931285714285716, -0.5957262620408164, 0.0023279999999998857, 0.5680872857142858,
      -0.022898262040816367, 0.376286, -0.14555871428571399, 0.6919757379591837, -0.1276480000000001,
      0.4519932857142859, 0.22360933795918364, 0.49762200000000006, -0.1507747142857141, -0.5881782620408164,
      -0.21014999999999995, 0.2898372857142859, -0.3548582620408164, -0.005465999999999971, 0.4934252857142858,
      -0.24131026204081635, 0.19589400000000007, 0.49685128571428594, 0.3899085379591836, 0.4221, 0.17265328571428595,
      0.6460337379591836, 0.18386999999999998, 0.23820328571428595, 0.6370997379591835, 0.33331200000000005,
      0.23382328571428612, -0.6167182620408164, 0.33980200000000005, -0.6185127142857142, -0.35913626204081633,
      -0.28866400000000003, 0.17515528571428596, 0.3756253379591837, -0.14216600000000013, 0.23373728571428565,
      0.4998897379591836, -0.0975720000000001, -0.15670271428571425, 0.5753397379591836, 0.16188599999999997,
      0.48512528571428604, -0.36986226204081635, -0.41914400000000007, -0.17982671428571417, 0.23191453795918365,
      0.506616, -0.4836127142857142, -0.4640782620408162, -0.3241979999999999, 0.20997128571428592, 0.27658517795918364,
      -0.07267800000000002, 0.3252532857142858, 0.46599173795918364, 0.021598000000000006, -0.12625071428571433,
      0.6282037379591837, 0.15946600000000005, 0.017191285714285742, 0.6838057379591835, -0.19209799999999988,
      -0.251992714285714, -0.49397426204081635, -0.300168, 0.05266728571428603, 0.4139847379591836,
      -0.38036799999999993, 0.025083285714285974, -0.30803826204081636,
    ],
    'faces': [
      27, 63, 97, 3, 2, 18, 12, 3, 18, 4, 12, 18, 2, 3, 20, 8, 2, 20, 12, 4, 21, 16, 6, 25, 16, 12, 29, 12, 21, 29, 21,
      9, 29, 31, 11, 37, 15, 11, 39, 17, 33, 40, 31, 10, 41, 27, 10, 42, 4, 18, 43, 34, 17, 43, 0, 23, 44, 26, 0, 44, 7,
      26, 44, 11, 31, 45, 31, 41, 45, 14, 38, 46, 39, 5, 47, 18, 2, 48, 2, 28, 48, 28, 34, 48, 1, 35, 49, 35, 41, 49, 6,
      16, 51, 16, 30, 51, 27, 50, 51, 11, 15, 52, 15, 22, 52, 10, 31, 53, 37, 23, 53, 31, 37, 53, 32, 3, 54, 25, 32, 54,
      7, 2, 55, 2, 8, 55, 26, 7, 55, 23, 0, 57, 0, 26, 57, 42, 23, 57, 36, 42, 57, 35, 24, 58, 41, 35, 59, 19, 45, 59,
      45, 41, 59, 35, 58, 59, 25, 6, 60, 14, 46, 60, 6, 50, 60, 50, 14, 60, 21, 4, 61, 17, 40, 61, 40, 21, 61, 4, 43,
      61, 43, 17, 61, 2, 7, 62, 22, 2, 62, 7, 52, 62, 52, 22, 62, 41, 10, 63, 30, 49, 63, 49, 41, 63, 27, 51, 63, 51,
      30, 63, 13, 24, 64, 24, 56, 64, 56, 33, 64, 29, 1, 65, 16, 29, 65, 30, 16, 65, 1, 49, 65, 49, 30, 65, 5, 13, 66,
      28, 5, 66, 1, 29, 67, 29, 9, 67, 9, 56, 67, 12, 16, 68, 16, 25, 68, 25, 54, 68, 14, 36, 69, 38, 14, 69, 36, 57,
      69, 9, 21, 70, 21, 40, 70, 40, 33, 70, 56, 9, 70, 33, 56, 70, 46, 38, 71, 46, 71, 72, 32, 25, 72, 25, 60, 72, 60,
      46, 72, 71, 32, 72, 36, 14, 73, 27, 42, 73, 42, 36, 73, 50, 27, 73, 14, 50, 73, 7, 37, 74, 37, 11, 74, 11, 52, 74,
      52, 7, 74, 43, 18, 75, 34, 43, 75, 18, 48, 75, 48, 34, 75, 39, 11, 76, 19, 39, 76, 11, 45, 76, 45, 19, 76, 8, 20,
      77, 20, 32, 77, 38, 8, 77, 32, 71, 77, 71, 38, 77, 23, 42, 78, 42, 10, 78, 10, 53, 78, 53, 23, 78, 37, 7, 79, 23,
      37, 79, 22, 15, 80, 15, 39, 80, 47, 22, 80, 39, 47, 80, 2, 22, 81, 28, 2, 81, 28, 81, 82, 5, 28, 82, 22, 47, 82,
      47, 5, 82, 81, 22, 82, 8, 38, 83, 55, 8, 83, 26, 55, 83, 57, 26, 83, 38, 69, 83, 69, 57, 83, 3, 12, 84, 54, 3, 84,
      12, 68, 84, 68, 54, 84, 13, 5, 86, 5, 19, 86, 85, 13, 86, 19, 85, 86, 33, 17, 87, 13, 64, 87, 64, 33, 87, 44, 23,
      88, 7, 44, 88, 79, 7, 88, 23, 79, 88, 35, 1, 89, 24, 35, 89, 56, 24, 89, 1, 67, 89, 67, 56, 89, 20, 3, 90, 3, 32,
      90, 32, 20, 90, 19, 59, 91, 59, 58, 91, 85, 19, 91, 58, 85, 91, 19, 5, 92, 39, 19, 92, 5, 39, 92, 17, 34, 93, 66,
      13, 93, 34, 66, 93, 87, 17, 93, 13, 87, 93, 34, 28, 94, 28, 66, 94, 66, 34, 94, 50, 6, 95, 6, 51, 95, 51, 50, 95,
      24, 13, 96, 58, 24, 96, 13, 85, 96, 85, 58, 96, 10, 27, 97, 63, 10, 97,
    ],
    'offset': [-0.51232, 0.342212714285714, 0.04341226204081637],
  },
  {
    'vertices': [
      0.3660814117647059, 0.029500705882353095, -0.16778876352941177, -0.3156445882352941, 0.06532270588235267,
      0.18228543647058826, -0.33282658823529415, -0.006607294117647378, 0.11370773647058821, 0.25892741176470585,
      -0.2249792941176474, 0.3349152364705883, 0.08784741176470587, -0.2149032941176472, -0.22988876352941176,
      0.04633941176470591, 0.058184705882352805, -0.48970076352941183, 0.12381141176470586, 0.07452470588235283,
      0.3830292364705882, -0.258036588235294, -0.1600632941176472, 0.005829036470588217, 0.04098741176470591,
      -0.28150929411764736, 0.2460456364705882, 0.41061541176470595, 0.07081870588235262, -0.03338476352941176,
      -0.3450645882352941, 0.0437147058823526, -0.08413376352941179, 0.01715741176470592, 0.08284070588235304,
      -0.27170876352941176, -0.24094258823529408, -0.06484529411764717, 0.2208768364705882, -0.21473058823529417,
      -0.11650329411764737, -0.1252727635294118, -0.1504305882352941, 0.06387070588235266, -0.32456076352941177,
      -0.3609905882352941, -0.03645729411764709, -0.03847756352941177, -0.202466588235294, 0.070484705882353,
      0.2716842364705882, 0.39971741176470593, 0.0710727058823526, -0.15883676352941178, -0.31544458823529425,
      0.0688527058823527, -0.043697363529411774, -0.05498458823529412, -0.21403329411764727, -0.07884796352941179,
      -0.12482258823529407, 0.07948870588235257, 0.12061409647058824, -0.058544588235294015, 0.07063670588235293,
      0.32887923647058825, 0.2498994117647059, 0.06788070588235273, 0.22077183647058823, -0.10711258823529413,
      -0.037223294117647576, -0.2924047635294118, -0.367866588235294, 0.029752705882352792, 0.042182436470588225,
      -0.23748858823529412, -0.11854529411764725, 0.13913183647058824, 0.340777411764706, 0.07426870588235301,
      0.013698636470588235, 0.03310941176470589, 0.07674670588235255, 0.3567412364705882, -0.23673658823529414,
      0.015080705882352774, -0.20956676352941178, 0.41705941176470585, 0.07070870588235278, -0.07161496352941178,
      0.04699941176470587, 0.07157070588235293, -0.3912067635294118, 0.3889054117647059, 0.07307270588235282,
      -0.03136916352941177, 0.3134834117647059, 0.07467670588235276, 0.055233236470588226, 0.38241541176470595,
      0.07259870588235273, 0.00683523647058823,
    ],
    'faces': [
      9, 31, 33, 0, 3, 4, 0, 4, 5, 4, 3, 8, 1, 2, 12, 4, 7, 13, 7, 2, 15, 13, 7, 15, 1, 12, 16, 0, 5, 17, 14, 10, 18,
      11, 14, 18, 7, 4, 19, 4, 8, 19, 8, 7, 19, 1, 16, 20, 18, 1, 20, 11, 18, 20, 3, 6, 21, 8, 3, 21, 12, 8, 21, 16, 12,
      21, 6, 3, 22, 3, 9, 22, 9, 6, 22, 5, 4, 23, 4, 13, 23, 14, 5, 23, 2, 1, 24, 15, 2, 24, 10, 15, 24, 1, 18, 24, 18,
      10, 24, 2, 7, 25, 7, 8, 25, 12, 2, 25, 8, 12, 25, 11, 20, 27, 20, 16, 27, 21, 6, 27, 16, 21, 27, 10, 14, 28, 15,
      10, 28, 13, 15, 28, 23, 13, 28, 14, 23, 28, 3, 0, 29, 9, 3, 29, 0, 17, 29, 17, 9, 29, 14, 11, 30, 5, 14, 30, 17,
      5, 30, 11, 17, 30, 9, 17, 31, 17, 11, 31, 26, 6, 31, 11, 26, 31, 6, 26, 32, 26, 11, 32, 11, 27, 32, 27, 6, 32, 6,
      9, 33, 31, 6, 33,
    ],
    'offset': [-0.2870554117647059, 1.3529012941176473, 0.19488476352941178],
  },
  {
    'vertices': [
      -0.6016301995454545, -0.11298877272727248, -0.09002618181818178, -0.45633219954545456, -0.19307877272727225,
      0.047631818181818164, 1.1126778004545455, -0.09671877272727247, 0.009249818181818137, 0.16073180045454546,
      0.0714752272727277, -0.3102201818181819, -0.47973219954545454, -0.07719077272727226, 0.38880981818181803,
      0.9991858004545453, 0.09607522727272766, 0.2068838181818181, 0.022929800454545457, -0.29497477272727246,
      0.04689381818181815, 0.14172380045454544, -0.12895477272727263, -0.28664018181818196, -0.7497521995454547,
      0.07903722727272777, 0.007315818181818146, -0.6521501995454545, 0.11715522727272765, 0.3354818181818181,
      0.9105118004545454, 0.1023672272727274, -0.033654181818181805, -0.5985761995454546, 0.10711922727272771,
      -0.1265701818181818, 0.9461178004545454, -0.15913277272727244, -0.08857418181818189, 1.1117978004545452,
      0.013451227272727628, 0.15471981818181801, -0.6832861995454547, -0.11190277272727212, 0.08499981818181812,
      -0.5412121995454545, 0.0028752272727277095, -0.18309018181818193, 0.9399918004545456, -0.05782277272727221,
      -0.11823218181818185, 0.22784980045454548, 0.10344522727272754, -0.24034018181818184, -0.4668541995454545,
      -0.2027047727272724, 0.15371381818181812, 0.9558458004545454, 0.05767922727272756, -0.08552018181818188,
      0.06543380045454547, -0.1729387727272722, -0.22234218181818188, 0.030275800454545476, 0.06535122727272791,
      -0.3171621818181818, -0.6892801995454546, -0.04443677272727253, 0.2244418181818182, -0.2910541995454545,
      0.1321292272727277, 0.23719181818181811, 0.20125980045454547, -0.2016547727272724, -0.1626881818181818,
      0.7193786004545455, 0.10933322727272765, -0.09076218181818185, 0.1598238004545455, -0.050338772727272385,
      -0.31006418181818185, -0.7587881995454544, 0.06829922727272741, 0.14383581818181812, -0.4746461995454545,
      -0.15473477272727187, 0.2712138181818181, -0.6363461995454546, 0.0857792272727278, -0.1408121818181819,
      0.7858478004545455, 0.08941122727272788, -0.13142218181818188, -0.7223781995454547, 0.11262122727272761,
      0.17027981818181803, 0.04836580045454544, 0.10025722727272779, -0.27614618181818185, -0.6088321995454545,
      0.016061227272727407, 0.36763781818181807, -0.6521401995454545, -0.03581677272727246, -0.09736418181818185,
      -0.7095521995454545, 0.08558922727272789, 0.28281181818181805, 0.011679800454545447, -0.006648772727272156,
      -0.30384418181818185, -0.6318761995454546, -0.13222677272727212, -0.02059018181818184, 1.0346798004545454,
      0.036149227272727735, 0.011689818181818024, 0.25509380045454555, 0.11206122727272749, -0.1087441818181819,
      0.5896877804545454, 0.11303922727272786, -0.0374761818181818, -0.42616219954545453, 0.12776122727272776,
      0.22924781818181816, 0.8349978004545455, 0.10226322727272796, 0.143773818181818, -0.43530619954545446,
      0.12747922727272787, 0.26446181818181813,
    ],
    'faces': [
      23, 41, 43, 2, 6, 12, 5, 4, 13, 6, 2, 13, 4, 6, 13, 7, 0, 15, 2, 12, 16, 1, 6, 18, 2, 16, 19, 6, 0, 20, 0, 7, 20,
      9, 5, 23, 17, 11, 23, 12, 6, 24, 7, 12, 24, 6, 20, 24, 20, 7, 24, 12, 7, 26, 3, 16, 26, 16, 12, 26, 21, 3, 26, 8,
      14, 27, 14, 22, 27, 6, 4, 28, 18, 6, 28, 14, 18, 28, 4, 22, 28, 22, 14, 28, 8, 11, 29, 21, 15, 29, 11, 21, 29, 16,
      3, 30, 3, 17, 30, 10, 19, 30, 19, 16, 30, 25, 10, 30, 17, 25, 30, 11, 8, 31, 8, 27, 31, 17, 3, 32, 11, 17, 32, 3,
      21, 32, 21, 11, 32, 4, 5, 33, 5, 9, 33, 22, 4, 33, 14, 8, 34, 15, 0, 34, 8, 29, 34, 29, 15, 34, 27, 22, 35, 9, 31,
      35, 31, 27, 35, 33, 9, 35, 22, 33, 35, 7, 15, 36, 15, 21, 36, 26, 7, 36, 21, 26, 36, 6, 1, 37, 0, 6, 37, 1, 18,
      37, 18, 14, 37, 34, 0, 37, 14, 34, 37, 10, 5, 38, 5, 13, 38, 13, 2, 38, 19, 10, 38, 2, 19, 38, 17, 23, 39, 25, 17,
      39, 25, 39, 40, 5, 10, 40, 10, 25, 40, 39, 23, 40, 23, 11, 41, 11, 31, 41, 31, 9, 41, 23, 5, 42, 5, 40, 42, 40,
      23, 42, 9, 23, 43, 41, 9, 43,
    ],
    'offset': [0.21466419954545454, 1.2996167727272723, -0.4651578181818181],
  },
  {
    'vertices': [
      -0.38889963636363656, 0.3642360363636368, -0.15230349090909087, 0.3035403636363634, -0.36622796363636323,
      -0.11490549090909094, 0.10640636363636324, -0.3093059636363631, -0.29422349090909095, -0.2568816363636366,
      0.08320203636363677, 0.38801810909090906, 0.2670063636363633, 0.05281203636363663, -0.13468349090909087,
      0.1539003636363634, 0.022908036363636697, 0.2905407090909091, 0.0742043636363634, -0.39352996363636317,
      0.0964475090909091, -0.5747736363636367, 0.3362260363636367, 0.15684250909090908, -0.14281763636363665,
      -0.010315963636363223, -0.40289549090909094, -0.04545763636363653, 0.262278036363637, 0.1609201090909091,
      0.06343436363636323, -0.4308119636363632, -0.11498949090909091, 0.03625636363636331, 0.06598403636363703,
      -0.3987814909090909, 0.2840203636363636, -0.2922019636363631, 0.17423490909090908, -0.4555976363636367,
      0.35126203636363695, 0.26950750909090904, 0.2835183636363636, -0.22228796363636305, -0.26544149090909097,
      0.35291436363636364, -0.16054996363636298, 0.025406509090909073, -0.11735163636363688, 0.27135003636363675,
      -0.21897349090909093, 0.12110636363636362, -0.13738596363636302, 0.33296930909090905, 0.25364836363636356,
      0.043306036363636835, 0.12921230909090908, -0.1969796363636367, 0.3462960363636365, -0.008419490909090922,
      -0.21949763636363628, 0.11976203636363691, -0.3831734909090909, 0.06628236363636364, -0.13342996363636295,
      -0.40664949090909086, -0.06498963636363642, 0.18339203636363677, 0.2990383090909091, 0.015322363636363745,
      -0.3168659636363633, -0.2653454909090909, 0.09516436363636349, 0.20422403636363673, 0.03638870909090908,
      -0.0320136363636363, -0.20964396363636317, 0.2800017090909091, 0.24281636363636339, -0.4041879636363632,
      0.0476655090909091, 0.11350436363636374, 0.14910603636363695, -0.2333754909090909, 0.2173123636363632,
      -0.040989963636363314, -0.3116374909090909, -0.22495363636363686, 0.26421203636363644, -0.29530149090909086,
      0.2025643636363632, -0.3367599636363632, 0.18298390909090909, 0.31875436363636345, -0.15248596363636313,
      0.14085270909090908, -0.02143963636363666, 0.015608036363636835, 0.37348050909090913, 0.32358036363636344,
      -0.10547596363636313, -0.16159349090909095, 0.3527603636363634, -0.2883639636363633, -0.04729349090909091,
      -0.4001776363636367, 0.24960803636363704, 0.34266390909090905, 0.22071836363636366, -0.3030279636363633,
      -0.283423490909091, 0.11630036363636354, 0.15739603636363664, 0.17347550909090909, 0.19459236363636334,
      -0.40760996363636326, -0.16456349090909092, 0.06366036363636352, 0.218040036363637, -0.08722749090909093,
      -0.5267956363636366, 0.3704300363636366, 0.19719050909090907, -0.048397636363636476, 0.08065003636363666,
      -0.4215574909090909, -0.05160363636363652, -0.18062796363636302, -0.35017149090909094, -0.0631856363636365,
      0.16627803636363692, -0.35981149090909104, 0.2213663636363632, -0.14756196363636298, 0.27014570909090907,
      -0.2637556363636364, 0.3467600363636365, 0.1303369090909091, 0.16960436363636333, -0.1675259636363633,
      -0.36228749090909085, 0.2811363636363635, 0.03941203636363677, -0.010889490909090895, 0.03420836363636326,
      -0.3188419636363631, 0.19204450909090912, -0.39166763636363644, 0.36946403636363656, 0.060129109090909086,
      -0.21878563636363646, 0.28591403636363677, 0.2502367090909091, -0.0975936363636365, -0.09418796363636317,
      0.33751790909090906, -0.18297363636363628, 0.14819403636363693, 0.3488941090909091, -0.1708616363636366,
      0.003132036363637125, 0.37045510909090906, -0.39215363636363665, 0.3587620363636368, 0.1923179090909091,
    ],
    'faces': [
      45, 49, 54, 6, 7, 10, 16, 0, 19, 7, 0, 20, 8, 7, 20, 2, 10, 23, 10, 7, 23, 19, 9, 24, 3, 7, 25, 6, 10, 26, 27, 4,
      28, 11, 27, 28, 0, 16, 29, 20, 0, 29, 12, 17, 30, 17, 25, 30, 6, 26, 30, 26, 12, 30, 12, 15, 31, 18, 5, 31, 15,
      18, 31, 17, 5, 32, 5, 22, 32, 28, 4, 33, 14, 28, 33, 1, 14, 34, 15, 12, 34, 26, 1, 34, 12, 26, 34, 14, 33, 34, 33,
      15, 34, 7, 3, 35, 13, 7, 35, 22, 13, 35, 14, 1, 36, 2, 21, 36, 5, 18, 37, 22, 5, 37, 9, 22, 37, 18, 24, 37, 24, 9,
      37, 10, 2, 38, 1, 26, 38, 26, 10, 38, 2, 36, 38, 36, 1, 38, 16, 19, 39, 24, 4, 39, 19, 24, 39, 4, 27, 39, 27, 16,
      39, 0, 7, 40, 7, 13, 40, 8, 20, 41, 21, 8, 41, 11, 21, 41, 20, 29, 41, 7, 8, 42, 21, 2, 42, 8, 21, 42, 23, 7, 42,
      2, 23, 42, 27, 11, 43, 16, 27, 43, 29, 16, 43, 11, 41, 43, 41, 29, 43, 5, 17, 44, 17, 12, 44, 12, 31, 44, 31, 5,
      44, 9, 19, 45, 21, 11, 46, 28, 14, 46, 11, 28, 46, 14, 36, 46, 36, 21, 46, 18, 15, 47, 4, 24, 47, 24, 18, 47, 33,
      4, 47, 15, 33, 47, 7, 6, 48, 25, 7, 48, 6, 30, 48, 30, 25, 48, 19, 0, 49, 0, 40, 49, 45, 19, 49, 22, 9, 50, 13,
      22, 50, 9, 45, 50, 45, 13, 50, 3, 25, 51, 25, 17, 51, 3, 32, 52, 32, 22, 52, 35, 3, 52, 22, 35, 52, 32, 3, 53, 17,
      32, 53, 3, 51, 53, 51, 17, 53, 40, 13, 54, 13, 45, 54, 49, 40, 54,
    ],
    'offset': [1.6692856363636366, 1.044049963636363, 0.06778949090909092],
  },
  {
    'vertices': [
      -0.40308024419999994, -0.7699881800000001, -0.46315770800000006, -1.2181462442, 0.7256198199999999,
      -0.013764908000000027, -0.11646464419999991, 0.004969819999999903, 0.916626292, 0.7389537557999998, -0.43350818,
      0.08661229199999997, -0.11382524419999984, 0.18518181999999972, -1.013897708, 0.21641575580000005,
      0.7286098199999995, 0.673170292, -0.9690622442, -0.4049481800000001, 0.5902862919999999, 0.05752415580000014,
      -0.8513481799999999, 0.29713629199999997, -0.4546962441999999, 0.7823778199999998, 0.727812292,
      0.8618417558000001, 0.25354382, -0.222143708, 0.3506497558, -0.7441881800000001, -0.456901708, -0.6862102442,
      -0.4537881800000001, -0.621381708, 0.06880955580000014, 0.75467182, -0.8164617080000001, 0.6613457558000001,
      -0.002580180000000265, 0.505046292, 0.5860337558000003, -0.08586818000000007, -0.6771277080000001,
      -0.44249024419999994, 0.036079819999999874, -0.990017708, 0.29692975580000025, 0.9818618199999998,
      0.32488449199999997, -0.5195622441999999, 0.20025981999999987, 0.949058292, -0.3300142441999999,
      0.7414038199999999, -0.7938577079999999, 0.5682257557999998, 0.8950138199999995, -0.35731370799999995,
      0.6955857558000001, 0.5366138199999999, 0.27550569199999997, -1.2409322442, 0.7199698199999998,
      0.14457909199999996, 0.01695675580000011, 1.01658582, -0.02765690800000003, -0.047099044199999995,
      -0.21612818000000011, -0.9214617079999999, 0.1712797558, -0.6940081800000002, 0.45961029200000003,
      -0.7050762441999998, -0.7788081800000001, 0.266512292, 0.11436375580000002, -0.9407481799999999,
      -0.17516970800000004, 0.6215437557999998, 0.4605478199999997, -0.606269708, 0.17355575580000016,
      0.9886318200000002, -0.45118570800000013, 0.33917975580000015, 0.6020138199999998, 0.717204292,
      0.6868637558000003, -0.4525681800000002, -0.347651708, -0.3798642441999999, -0.06542018000000005, 0.944632292,
      0.5839417558000001, -0.6409681800000002, 0.124584092, -0.5692142441999999, 0.06923581999999984, -0.920123708,
      0.25867375579999996, 0.11516781999999992, -0.903225708, -0.6572102441999998, -0.7397681800000002,
      -0.33025770800000004, -1.2245482441999997, 0.5383698199999998, 0.125714092, 0.8673837558, 0.2372718199999999,
      0.03443529199999999, -1.0121402442, -0.21659417999999997, 0.605586292, -0.7799882441999999, -0.54950818,
      0.5392182919999999, 0.6355257558000001, -0.3570881800000002, 0.396464292, -0.18080684419999993, -0.78596818,
      -0.523663708, 0.19039575580000012, -0.09718618000000001, 0.775078292, -0.04330364419999999, 0.7200658199999999,
      0.771312292, 0.1500757558000002, 0.9991478199999997, 0.36020809200000004, -1.1221742442, 0.6581438199999998,
      0.31112869199999993, -0.41735624419999995, -0.21010617999999992, -0.902557708, 0.33658175580000005, 0.56968182,
      -0.793513708, 0.3109577558000002, -0.34706818000000017, -0.751069708, -0.10105464419999988, 0.6344558199999999,
      -0.926969708, -0.4112502441999999, 0.6071898199999999, -0.835673708, 0.8399597558000002, -0.1351661799999999,
      0.03783429199999998, -0.06157402419999991, -0.9271081800000002, 0.13998729199999999, -0.018181644199999902,
      -0.6019081800000002, 0.570504292, 0.4277077558000001, -0.7971681800000001, -0.010162508000000015,
      0.4767337558000001, 0.6720218200000001, 0.5667382919999999, -0.38814424419999993, 0.39134782, 0.9232702920000001,
      0.1088999558, -0.7839081800000002, -0.518187708, 0.7925237557999999, -0.21517418, -0.301371708,
      0.4042797558000001, 0.9950378199999999, -0.214315708, -0.19786384419999992, -0.82978818, 0.342906092,
      -0.31571824419999994, -0.9109281800000001, -0.15114370800000004, -0.6209482441999999, -0.006706180000000117,
      0.908900292, 0.7579537557999999, -0.1341521800000003, 0.34054429199999997, 0.7503877558000002,
      0.28304382000000006, 0.33133769199999996, 0.5556937558, -0.6636681800000002, -0.30641370800000006,
      0.5167977558000002, -0.5995681800000001, -0.4592977079999999, 0.34417575580000015, -0.8202681799999999,
      0.14252089199999995, 0.4512357558000001, 0.7896498199999997, -0.585709708, 0.36773175580000006, -0.59364818,
      0.435814292, 0.02744575579999997, -0.20975218000000018, 0.7949442919999999, -0.6990742442, 0.15290382000000013,
      0.831306292, -0.6023022441999999, 0.7234398199999998, 0.6857922919999999, 0.7316157558000002, 0.00879582000000001,
      -0.49260970800000003, 0.33631175580000006, 0.3047818200000001, 0.7356682920000001, -0.2745090441999999,
      -0.8856281800000003, -0.34103570800000005, 0.0006743558000000816, 0.44480582, -0.965527708, -1.0753142441999999,
      0.72474982, -0.164805708, -1.1925322442, 0.42581581999999996, 0.30351909199999993, 0.1605977557999999,
      -0.8799681800000002, -0.3734417080000001, 0.0073185558000000706, -0.021552180000000032, -0.978591708,
      0.3839217558, -0.8123881800000001, -0.27761970799999997, -0.04822584419999987, 0.9908598199999998,
      -0.21618770800000003, 0.004456555800000039, 0.8332298200000001, 0.6534722919999999, 0.07555815580000014,
      0.21724582000000003, 0.8540062920000001, -0.6397282442, -0.8099081800000001, -0.18406770800000005, 0.6223177558,
      0.6339338200000002, 0.30844289199999997, 0.7415757558000001, 0.45017382000000006, -0.41218370800000004,
      -0.2636902442, -0.21275218000000007, -0.9322117080000001, -0.3807502441999999, -0.71960818, -0.5384117079999999,
      0.12385975580000008, -0.9193681800000002, 0.13544449199999997, 0.6187217558000001, -0.24643017999999994,
      -0.5793757079999999, 0.8879677558, 0.21585582000000003, -0.09953370800000001, 0.40772575580000014,
      -0.3284681800000002, 0.563232292, -0.7781602442, -0.6608081800000001, 0.436738292, 0.5955857558000001,
      -0.52956818, 0.295302692, -0.5459682441999999, 0.3637998199999999, 0.8791182919999999, -0.3570322441999999,
      -0.19404218000000029, 0.864604292, -0.17904004419999997, 0.44445982000000006, 0.879776292, -0.2950022441999999,
      0.4589178199999999, -0.939449708,
    ],
    'faces': [
      50, 49, 99, 1, 21, 22, 12, 18, 28, 2, 17, 31, 11, 1, 33, 15, 11, 33, 27, 14, 34, 1, 11, 36, 21, 1, 36, 35, 6, 36,
      11, 35, 36, 19, 20, 37, 31, 6, 39, 29, 5, 43, 21, 8, 44, 22, 21, 44, 11, 15, 46, 27, 34, 47, 34, 14, 48, 18, 12,
      49, 12, 47, 49, 18, 49, 50, 16, 5, 55, 5, 29, 55, 29, 13, 55, 17, 2, 56, 43, 8, 56, 48, 10, 57, 23, 48, 57, 3, 30,
      58, 51, 3, 58, 16, 19, 59, 19, 28, 59, 28, 22, 59, 44, 16, 59, 22, 44, 59, 7, 24, 60, 25, 52, 60, 52, 7, 60, 24,
      53, 60, 53, 39, 60, 52, 25, 61, 26, 52, 61, 31, 17, 62, 6, 31, 62, 38, 6, 62, 13, 40, 63, 40, 3, 63, 3, 51, 63,
      51, 37, 63, 37, 20, 64, 20, 55, 64, 55, 13, 64, 13, 63, 64, 63, 37, 64, 30, 3, 65, 3, 32, 65, 32, 54, 65, 10, 48,
      66, 65, 10, 66, 30, 65, 66, 24, 7, 67, 54, 32, 67, 19, 27, 68, 12, 28, 68, 28, 19, 68, 47, 12, 68, 27, 47, 68, 24,
      67, 69, 2, 31, 70, 42, 2, 70, 53, 24, 70, 31, 53, 70, 24, 69, 70, 62, 17, 71, 38, 62, 71, 8, 21, 72, 21, 45, 72,
      14, 27, 73, 9, 58, 73, 13, 29, 74, 42, 13, 74, 35, 0, 75, 0, 41, 75, 26, 61, 75, 34, 4, 76, 47, 34, 76, 4, 49, 76,
      49, 47, 76, 28, 18, 77, 33, 1, 77, 18, 50, 77, 50, 33, 77, 21, 36, 78, 36, 6, 78, 6, 38, 78, 45, 21, 78, 71, 45,
      78, 38, 71, 78, 57, 10, 79, 41, 57, 79, 75, 41, 79, 26, 75, 79, 15, 4, 80, 4, 34, 80, 48, 23, 80, 34, 48, 80, 54,
      26, 81, 10, 65, 81, 65, 54, 81, 26, 79, 81, 79, 10, 81, 1, 22, 82, 22, 28, 82, 77, 1, 82, 28, 77, 82, 5, 16, 83,
      8, 43, 83, 43, 5, 83, 16, 44, 83, 44, 8, 83, 2, 42, 84, 74, 29, 84, 42, 74, 84, 25, 6, 85, 6, 35, 85, 61, 25, 85,
      35, 75, 85, 75, 61, 85, 19, 16, 86, 20, 19, 86, 16, 55, 86, 55, 20, 86, 19, 9, 87, 27, 19, 87, 9, 73, 87, 73, 27,
      87, 46, 15, 88, 23, 57, 88, 57, 41, 88, 15, 80, 88, 80, 23, 88, 0, 35, 89, 35, 11, 89, 41, 0, 89, 11, 46, 89, 46,
      88, 89, 88, 41, 89, 7, 52, 90, 52, 26, 90, 26, 54, 90, 67, 7, 90, 54, 67, 90, 48, 14, 91, 58, 30, 91, 30, 66, 91,
      66, 48, 91, 14, 73, 91, 73, 58, 91, 9, 19, 92, 19, 37, 92, 37, 51, 92, 58, 9, 92, 51, 58, 92, 40, 13, 93, 13, 42,
      93, 69, 40, 93, 42, 70, 93, 70, 69, 93, 6, 25, 94, 39, 6, 94, 25, 60, 94, 60, 39, 94, 32, 3, 95, 3, 40, 95, 67,
      32, 95, 40, 69, 95, 69, 67, 95, 17, 56, 96, 56, 8, 96, 71, 17, 96, 45, 71, 96, 8, 72, 96, 72, 45, 96, 31, 39, 97,
      53, 31, 97, 39, 53, 97, 29, 43, 98, 56, 2, 98, 43, 56, 98, 2, 84, 98, 84, 29, 98, 4, 15, 99, 15, 33, 99, 49, 4,
      99, 33, 50, 99,
    ],
    'offset': [0.8761062441999999, 0.41324817999999996, 0.12980170800000002],
  },
  {
    'vertices': [
      -0.13160068571428551, -0.10037142857142872, -0.18204298857142853, 0.14729931428571436, 0.2696285714285716,
      -0.5676923885714286, 0.17692131428571434, -0.20417142857142873, 0.5509770114285715, -0.1508426857142856,
      -0.28669142857142854, 0.32935301142857165, -0.16120668571428554, 0.19740857142857154, -0.6566465885714285,
      0.060179314285714214, 0.18098857142857122, 0.29211901142857166, -0.11521268571428556, 0.4156685714285711,
      -0.5646795885714285, 0.034337314285714404, -0.0007514285714284585, -0.42211098857142854, 0.11114531428571428,
      -0.3599314285714285, 0.48693901142857166, 0.1234733142857144, 0.39600857142857143, -0.5363215885714285,
      -0.05555868571428568, 0.23240857142857158, 0.1459250114285715, -0.1940766857142857, -0.09059142857142838,
      0.030633011428571444, 0.040387314285714404, 0.06622857142857136, 0.42506901142857156, -0.04705268571428567,
      -0.37081142857142885, 0.34696701142857145, -0.05155668571428551, 0.08750857142857155, -0.6260427885714286,
      0.1406773142857145, 0.0013485714285714212, 0.48602901142857147, 0.13718531428571423, 0.04752857142857153,
      -0.3004929885714286, 0.051929314285714345, 0.4305685714285716, -0.5295879885714285, 0.06011931428571449,
      -0.3446714285714288, 0.5099670114285715, -0.16310668571428555, -0.3138314285714285, 0.2909790114285715,
      0.0621433142857144, 0.14142857142857107, -0.6136413885714286, -0.04926668571428572, -0.1329914285714286,
      -0.1999409885714286, 0.1673713142857144, 0.10650857142857112, -0.18498498857142853, 0.15057131428571435,
      -0.30271142857142846, 0.4922070114285715, 0.01548131428571431, 0.2502685714285711, 0.14662701142857149,
      0.08829931428571436, -0.06187142857142852, 0.5015770114285714, -0.10185068571428568, 0.2512085714285715,
      -0.0888589885714286, -0.013214685714285745, 0.17528857142857107, 0.28392701142857146, -0.1846906857142856,
      -0.18751142857142872, 0.19199501142857156, -0.02984868571428556, -0.3721114285714285, 0.4424830114285714,
      -0.12589468571428575, 0.016268571428571355, -0.4180329885714285, -0.18062268571428575, -0.20019142857142863,
      0.12600501142857157, -0.1028206857142856, -0.3413714285714288, 0.3835230114285715, 0.1568233142857144,
      0.1510885714285713, -0.3558429885714286, 0.1340793142857143, 0.2532285714285713, -0.2163809885714285,
    ],
    'faces': [
      15, 22, 34, 1, 4, 9, 4, 6, 9, 6, 4, 11, 7, 8, 13, 9, 5, 15, 5, 12, 15, 8, 7, 16, 9, 6, 17, 8, 2, 18, 4, 1, 20, 14,
      4, 20, 7, 14, 20, 1, 16, 20, 16, 7, 20, 7, 13, 21, 14, 7, 21, 13, 19, 21, 19, 0, 21, 1, 9, 22, 15, 2, 22, 2, 8,
      23, 8, 16, 23, 22, 2, 23, 5, 9, 24, 6, 10, 24, 9, 17, 24, 17, 6, 24, 12, 3, 25, 2, 15, 25, 15, 12, 25, 18, 2, 25,
      10, 6, 26, 6, 11, 26, 11, 10, 26, 3, 12, 27, 12, 5, 27, 5, 24, 27, 24, 10, 27, 10, 11, 28, 19, 3, 28, 3, 27, 28,
      27, 10, 28, 13, 8, 29, 8, 18, 29, 4, 14, 30, 0, 19, 30, 21, 0, 30, 14, 21, 30, 11, 4, 31, 28, 11, 31, 19, 28, 31,
      4, 30, 31, 30, 19, 31, 19, 13, 32, 3, 19, 32, 25, 3, 32, 18, 25, 32, 13, 29, 32, 29, 18, 32, 16, 1, 33, 1, 22, 33,
      23, 16, 33, 22, 23, 33, 9, 15, 34, 22, 9, 34,
    ],
    'offset': [-0.5936853142857144, -1.1483885714285715, 0.9918049885714285],
  },
  {
    'vertices': [
      0.09312872631578953, -0.29894631578947356, -0.0011813031578947197, -0.1632192736842105, -0.1469863157894737,
      -0.06609650315789473, -0.35512527368421054, 0.4724736842105263, -0.3376047031578947, -0.6243572736842105,
      0.29365368421052623, -0.15933002315789474, 0.3777807263157894, 0.0787136842105261, 0.14237989684210534,
      -0.4531292736842105, 0.23901368421052654, -0.42224810315789474, 0.1264067263157895, 0.14079368421052602,
      -0.16032238315789474, 0.35964672631578953, -0.3381663157894739, 0.39200189684210524, -0.5657552736842105,
      0.3921936842105265, -0.12771410315789472, 0.41782672631578943, -0.12360631578947362, 0.3883638968421053,
      0.29099272631578954, -0.418146315789474, 0.2295458968421052, -0.41237927368421046, 0.4457936842105263,
      -0.15932378315789472, 0.3899187263157895, 0.05261368421052609, 0.09152989684210527, -0.5363972736842105,
      0.2167536842105265, -0.3734841031578947, 0.4509681263157894, -0.027866315789473906, 0.3075438968421053,
      -0.3795712736842104, 0.33447368421052653, -0.42829010315789473, -0.09351927368421045, -0.06594631578947369,
      -0.19642550315789475, 0.2838687263157895, -0.37750631578947386, 0.3062118968421053, 0.3958947263157895,
      -0.24354631578947367, 0.4214858968421053, 0.2794287263157895, 0.15415368421052605, 0.007536696842105284,
      0.14320272631578954, -0.2919463157894738, 0.013442296842105295, 0.4326667263157895, -0.27870631578947386,
      0.41334989684210527, -0.2809232736842105, -0.040806315789473524, -0.05027850315789473, -0.49787727368421053,
      0.13425368421052614, -0.2363301031578947, 0.4432377263157894, 0.004533684210526301, 0.1890798968421053,
      -0.34516127368421046, 0.4674336842105263, -0.25967430315789475, -0.3055552736842105, 0.006293684210526396,
      -0.2362915031578947, 0.23927872631578953, -0.38316631578947397, 0.13180189684210525, 0.3199867263157895,
      0.08781368421052632, 0.004519696842105236, 0.2704487263157894, 0.13697368421052608, -0.043285303157894695,
      -0.6068352736842105, 0.24107368421052638, -0.2522121031578947, -0.03149127368421051, -0.17204631578947377,
      -0.12184290315789473, 0.4637207263157894, -0.14404631578947352, 0.3903978968421053, 0.17715672631578952,
      -0.36720631578947355, 0.09820189684210529, -0.2416532736842105, 0.38989368421052645, -0.13437830315789473,
      -0.33435127368421047, -0.011826315789473962, -0.1518035031578947, 0.34735872631578946, -0.3812463157894737,
      0.33390789684210526, -0.07561727368421053, -0.1771863157894739, 0.05681589684210525,
    ],
    'faces': [
      17, 22, 37, 2, 8, 11, 8, 9, 11, 11, 9, 14, 2, 6, 15, 13, 2, 15, 5, 13, 15, 15, 6, 16, 5, 15, 16, 7, 3, 17, 3, 7,
      18, 8, 3, 18, 9, 8, 18, 4, 12, 19, 16, 6, 20, 18, 7, 21, 17, 3, 22, 12, 4, 24, 4, 14, 24, 21, 10, 24, 2, 11, 25,
      19, 2, 25, 4, 19, 25, 0, 1, 26, 13, 5, 26, 0, 20, 27, 12, 24, 27, 24, 10, 27, 20, 6, 28, 27, 20, 28, 12, 27, 28,
      6, 2, 29, 2, 19, 29, 19, 12, 29, 28, 6, 29, 12, 28, 29, 8, 2, 30, 3, 8, 30, 2, 13, 30, 22, 3, 30, 13, 23, 30, 5,
      16, 31, 20, 0, 31, 16, 20, 31, 0, 26, 31, 26, 5, 31, 14, 9, 32, 9, 18, 32, 18, 21, 32, 24, 14, 32, 21, 24, 32, 1,
      0, 33, 10, 1, 33, 0, 27, 33, 27, 10, 33, 14, 4, 34, 11, 14, 34, 25, 11, 34, 4, 25, 34, 1, 22, 35, 23, 13, 35, 26,
      1, 35, 13, 26, 35, 22, 30, 35, 30, 23, 35, 7, 17, 36, 17, 10, 36, 21, 7, 36, 10, 21, 36, 1, 10, 37, 10, 17, 37,
      22, 1, 37,
    ],
    'offset': [0.1645132736842105, -1.2354536842105264, 0.47061810315789476],
  }
];